/* 基础样式 */
:root {
    --primary-color: #6C5CE7;
    --secondary-color: #A8A4FF;
    --accent-color: #00FF88;
    --background-color: #13111C;
    --surface-color: #1E1B2E;
    --text-primary: #FFFFFF;
    --text-secondary: #A0A0A0;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* 导航栏样式 */
.header {
    background-color: var(--surface-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-text {
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-container {
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 0.5rem 1rem;
}

.search-container input {
    background: none;
    border: none;
    color: var(--text-primary);
    padding: 0.5rem;
    width: 200px;
    outline: none;
}

.search-container input::placeholder {
    color: var(--text-secondary);
}

.search-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.search-btn:hover {
    color: var(--text-primary);
}

.user-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.user-btn:hover {
    color: var(--text-primary);
}

/* 主要内容区域 */
.main {
    margin-top: 5rem;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* 英雄区域 */
.hero-section {
    text-align: center;
    padding: 4rem 0;
    margin-bottom: 4rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-secondary);
}

/* 分类部分 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.8rem;
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.view-all:hover {
    opacity: 0.8;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.category-card {
    position: relative;
    height: 200px;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.game-count {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 热门游戏部分 */
.section-tabs {
    display: flex;
    gap: 1rem;
}

.tab {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.tab:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.1);
}

.tab.active {
    color: var(--text-primary);
    background-color: var(--primary-color);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.game-card {
    background-color: var(--surface-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
}

.game-image {
    position: relative;
    aspect-ratio: 3/4;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .game-overlay {
    opacity: 1;
}

.play-now {
    background-color: var(--accent-color);
    color: var(--background-color);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.game-card:hover .play-now {
    transform: translateY(0);
}

.game-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--primary-color);
    color: var(--text-primary);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
}

.game-info {
    padding: 1.2rem;
}

.game-info h3 {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-tags {
    display: flex;
    gap: 0.5rem;
}

.game-tags span {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.game-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.star {
    color: var(--accent-color);
}

/* 页脚样式 */
.footer {
    background-color: var(--surface-color);
    padding: 4rem 0 2rem;
    margin-top: 6rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    color: transparent;
}

.footer-brand p {
    color: var(--text-secondary);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.footer-column a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.8rem;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--text-primary);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
}

.footer-legal {
    display: flex;
    gap: 2rem;
}

.footer-legal a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: var(--text-primary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 2rem;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: 1fr 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-legal {
        justify-content: center;
    }
}
